﻿<%@ Page Language="C#" MasterPageFile="~/admin.Master" AutoEventWireup="true" CodeBehind="ChangeUser.aspx.cs" Inherits="sdamarketing.Administration.ChangeUser" Title="Ebiznis 2009" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="title1PlaceHolder" runat="server">
    </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="text1PlaceHolder" runat="server">
    <table style="width:100%;">
    <tr>
        <td style="width: 171px; text-align: right; height: 15px;">
        </td>
        <td style="width: 210px; height: 15px;">
        </td>
        <td style="text-align: left; " rowspan="7">
                            <asp:Image ID="Image2" runat="server" Height="170px" 
                                ImageUrl="~/sliki/User.jpg" Width="170px" 
                ImageAlign="Left" />
            </td>
    </tr>
    <tr>
        <td style="width: 171px; text-align: right; height: 26px;">
            <asp:Label ID="lblName" runat="server" Text="Име"></asp:Label>
        </td>
        <td style="width: 210px; height: 26px;">
            <asp:TextBox ID="TextBoxName" runat="server" Width="168px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td style="width: 171px; text-align: right; height: 27px;">
            <asp:Label ID="lblUsername" runat="server" Text="Корисничко име"></asp:Label>
        </td>
        <td style="width: 210px; height: 27px;">
            <asp:TextBox ID="TextBoxUsername" runat="server" Width="168px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td style="width: 171px; text-align: right;">
            <asp:Label ID="lblLastName" runat="server" Text="Презиме"></asp:Label>
        </td>
        <td style="width: 210px">
            <asp:TextBox ID="TextBoxLastName" runat="server" Width="168px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td style="width: 171px; text-align: right;">
            <asp:Label ID="lblPriveleges" runat="server" Text="Привилегија"></asp:Label>
        </td>
        <td style="width: 210px">
            <asp:DropDownList ID="PrivilegesDropDownList" runat="server" Width="168px">
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td style="width: 171px; text-align: right;">
            &nbsp;</td>
        <td style="width: 210px">
            <asp:Button ID="SearchButton" runat="server" onclick="SearchButton_Click" 
                Text="Пребарај" Width="70px" />
        </td>
    </tr>
    <tr>
        <td style="width: 171px">
            &nbsp;</td>
        <td style="width: 210px">
            <asp:Label ID="lblSelectOne" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td colspan="3">
        <hr />
            <asp:Panel ID="PanelUsersDetails" runat="server">
                <table style="width:100%;">
                    <tr>
                        <td style="width: 170px; text-align: right;">
                            <asp:Label ID="lblUsernameEdit" runat="server" Text="Корисничко име"></asp:Label>
                        </td>
                        <td style="width: 210px">
                            <asp:TextBox ID="TextBoxUsernameEdit" runat="server" Width="168px"></asp:TextBox>
                        </td>
                        <td rowspan="7" style="text-align: left">
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                                meta:resourcekey="ValidationSummary1Resource1" 
                                ValidationGroup="RegisterGroup" />
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 170px; text-align: right;">
                            <asp:Label ID="lblName0" runat="server" meta:resourcekey="Label3Resource1" 
                                Text="Име"></asp:Label>
                        </td>
                        <td style="width: 210px">
                            <asp:TextBox ID="FirstNameTextBox" runat="server" MaxLength="50" 
                                meta:resourcekey="FirstNameTextBoxResource1" ValidationGroup="RegisterGroup" 
                                Width="168px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="FirstNameTextBox" ErrorMessage="Ве молиме внесете име" 
                                meta:resourcekey="RequiredFieldValidator1Resource1" 
                                ValidationGroup="RegisterGroup">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 9px; width: 170px; text-align: right;">
                            <asp:Label ID="lblLastname0" runat="server" meta:resourcekey="Label4Resource1" 
                    Text="Презиме"></asp:Label>
                        </td>
                        <td style="height: 9px; width: 210px">
                            <asp:TextBox ID="LastNameTextBox" runat="server" MaxLength="50" 
                    meta:resourcekey="LastNameTextBoxResource1" ValidationGroup="RegisterGroup" 
                    Width="168px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                ControlToValidate="LastNameTextBox" ErrorMessage="Ве молиме внесете презиме" 
                                meta:resourcekey="RequiredFieldValidator2Resource1" 
                                ValidationGroup="RegisterGroup">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 170px; height: 9px; text-align: right;">
                            <asp:Label ID="lblEmail" runat="server" meta:resourcekey="Label5Resource1" 
                                Text="E-пошта"></asp:Label>
                        </td>
                        <td style="width: 210px; height: 9px;">
                            <asp:TextBox ID="EMailTextBox" runat="server" MaxLength="50" 
                                meta:resourcekey="EMailTextBoxResource1" ValidationGroup="RegisterGroup" 
                                Width="168px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                ControlToValidate="EMailTextBox" ErrorMessage="Ве молиме внесете Е-пошта" 
                                meta:resourcekey="RequiredFieldValidator3Resource1" 
                                ValidationGroup="RegisterGroup">*</asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                ControlToValidate="EMailTextBox" 
                                ErrorMessage="Ве молиме внесете Е-пошта во точен формат" 
                                meta:resourcekey="RegularExpressionValidator1Resource1" 
                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                                ValidationGroup="RegisterGroup">*</asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 170px; text-align: right;">
                            <asp:Label ID="lblPriveleges0" runat="server" Text="Привилегија"></asp:Label>
                        </td>
                        <td style="width: 210px">
                            <asp:DropDownList ID="PrivilegesDropDownListEdit" runat="server" 
                                ValidationGroup="RegisterGroup" Width="168px">
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                                ControlToValidate="PrivilegesDropDownListEdit" 
                                ErrorMessage="Ве молиме изберете привилегија" ValidationGroup="RegisterGroup">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 170px; text-align: right;">
                            <asp:Label ID="lblBlocked" runat="server" Text="Блокиран"></asp:Label>
                        </td>
                        <td style="width: 210px">
                            <asp:CheckBox ID="BlockedCheckBox" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 170px">
                            &nbsp;</td>
                        <td style="width: 210px">
                            <asp:Button ID="saveButton" runat="server" onclick="saveButton_Click" 
                                Text="Зачувај" ValidationGroup="RegisterGroup" />
                            <cc1:ConfirmButtonExtender ID="saveButton_ConfirmButtonExtender" runat="server" 
                                ConfirmText="Дали сте сигурни?" Enabled="True" TargetControlID="saveButton">
                            </cc1:ConfirmButtonExtender>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <asp:Label ID="lblMessage" runat="server" ForeColor="Red" 
                                meta:resourcekey="UserExsistLabelResource1"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            &nbsp;</td>
                    </tr>
                </table>
            </asp:Panel>
        </td>
    </tr>
    <tr>
        <td colspan="3">
            <asp:GridView ID="UsersGridView" runat="server" AutoGenerateColumns="False" 
                GridLines="None" 
                onselectedindexchanged="UsersGridView_SelectedIndexChanged" 
                AllowPaging="True" CellPadding="4" ForeColor="#333333" PageSize="20" 
                onpageindexchanging="UsersGridView_PageIndexChanging" 
                BorderColor="#0066FF" BorderWidth="1px" BorderStyle="Solid" 
                onrowdeleting="UsersGridView_RowDeleting">
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#EFF3FB" />
                <Columns>
                    <asp:BoundField DataField="firstName" HeaderText="Име" >
                        <ItemStyle Width="200px" HorizontalAlign="Left" VerticalAlign="Middle" />
                    </asp:BoundField>
                    <asp:BoundField DataField="lastName" HeaderText="Презиме" >
                        <ItemStyle Width="200px" HorizontalAlign="Left" VerticalAlign="Middle" />
                    </asp:BoundField>
                    <asp:BoundField DataField="username" HeaderText="User" >
                        <ItemStyle Width="200px" HorizontalAlign="Left" VerticalAlign="Middle" />
                    </asp:BoundField>
                    <asp:BoundField DataField="name" HeaderText="Привилегија" >
                        <ItemStyle Width="200px" HorizontalAlign="Left" VerticalAlign="Middle" />
                    </asp:BoundField>
                    <asp:CheckBoxField DataField="isBlock" HeaderText="Блокиран">
                        <ItemStyle Width="50px" HorizontalAlign="Left" VerticalAlign="Middle" />
                    </asp:CheckBoxField>
                    <asp:CommandField SelectText="Избери" ShowSelectButton="True" 
                        ButtonType="Image" SelectImageUrl="~/sliki/Write.png">
                    <ItemStyle Width="50px" />
                    </asp:CommandField>
                        
                 <asp:TemplateField>
                         <ItemTemplate> 
                             <asp:LinkButton ID="LinkButton1" Runat="server" OnClientClick="return confirm('Дали сакате да го избришете корисникот?');" CommandName="Delete"><img src="../sliki/Trash.png" border="0" />
                             </asp:LinkButton>
                        </ItemTemplate>
                         <ItemStyle Width="50px" />
                   </asp:TemplateField> 
                   
                </Columns>
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#BDC7D2" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#2461BF" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
        </td>
    </tr>
</table>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="mainTitle2PlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="title2PlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="text2PlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content7" runat="server" 
    contentplaceholderid="mainTitle1PlaceHolder">
                <h2 class="title">
                    &nbsp;&nbsp;најди и измени корисник</h2>
                
</asp:Content>

